import request from '@/utils/request'
import common from './common'
import paths from './paths'

const projectService = {};

(function (service) {
  service.startProject = function (projectParams) {
    return common.post(paths.project.startProject, null, projectParams)
  }

  service.startYtgzProject = function (projectParams) {
    return common.post(paths.project.startYtgzProject, null, projectParams)
  }

  service.startComposeProject = function (params, data) {
    return common.post(paths.project.startComposeProject, params, data)
  }

  // 土储：excel导入并创建案件
  service.importProject = function (projectParams) {
    return common.post(paths.project.importProject, null, projectParams)
  }
  // 土储：excel导入并创建案件
  service.importUnit = function (data, params) {
    return common.post(paths.project.importUnit, params, data)
  }

  service.testSaveData = function (projectId, projectData) {
    return common.post(paths.project.testSaveData + '/' + projectId, null, projectData)
  }
  service.saveData = function (params, projectData) {
    return common.post(paths.project.saveData.replace('{projectId}', params.projectId), params, projectData)
  }

  // 保存/发送 更新图形入库
  service.updateAttribute = function (params, projectData) {
    return common.post(paths.project.updateAttribute, params, projectData)
  }

  service.getProjectData = function (projectId) {
    return common.get(paths.project.getProjectData + projectId + '/data', null)
  }

  service.getBusinessByProjectId = function (projectId) {
    return common.get(paths.project.getBusinessByProjectId, { projectId: projectId })
  }

  service.listProjectFormDTOByProjectId = function (projectId) {
    return common.get(paths.project.listProjectFormDTOByProjectId, { projectId: projectId })
  }

  service.listProjectFormDTOByTaskId = function (projectId, taskId, listType, filterParamStr, groupEnable) {
    if (!taskId) {
      listType = 'project'
    }
    return common.get(paths.project.listProjectFormDTOByTaskId, {
      projectId: projectId,
      taskId: taskId,
      listType: listType,
      filterParamStr: filterParamStr,
      groupEnable: groupEnable
    })
  }

  service.listProjectFormDTOWithRevisionByProjectId = function (projectId) {
    return common.get(paths.project.listProjectFormDTOWithRevisionByProjectId, { projectId: projectId })
  }

  service.getProjectFormById = function (id) {
    return common.get(paths.project.getProjectFormById, { id: id })
  }

  service.upgradeAllProjectFormRevision = function (projectId) {
    return common.postxf(paths.project.upgradeAllProjectFormRevision, { projectId: projectId })
  }

  service.upgradeSelectFormRevision = function (projectFormIds) {
    return common.get(paths.project.upgradeSelectFormRevision, { projectFormIds: projectFormIds })
  }

  service.upgradeSelectFormRevisions = function (projectForm) {
    return common.post(paths.project.upgradeSelectFormRevisions, null, projectForm)
  }

  service.upgradeProjectFormRevision = function (projectFormId) {
    return common.postxf(paths.project.upgradeProjectFormRevision, { projectFormId: projectFormId })
  }

  service.switchProjectFormRevision = function (projectFormId, revisionId) {
    return common.postxf(paths.project.switchProjectFormRevision, {
      projectFormId: projectFormId,
      revisionId: revisionId
    })
  }

  service.listProjectReportDTOByProjectId = function (projectId) {
    return common.get(paths.project.listProjectReportDTOByProjectId, { projectId: projectId })
  }

  service.listProjectReportDTOByTaskId = function (projectId, taskId, listType, filterParamStr, loadShowReportUrl) {
    if (!taskId) {
      listType = 'project'
    }
    return common.get(paths.project.listProjectReportDTOByTaskId, {
      projectId: projectId,
      taskId: taskId,
      listType: listType,
      filterParamStr: filterParamStr,
      loadShowReportUrl: loadShowReportUrl
    })
  }

  service.listProjectReportDTOWithRevisionByProjectId = function (projectId) {
    return common.get(paths.project.listProjectReportDTOWithRevisionByProjectId, { projectId: projectId })
  }

  service.getProjectReportById = function (id) {
    return common.get(paths.project.getProjectReportById, { id: id })
  }

  service.upgradeAllProjectReportRevision = function (projectId) {
    return common.postxf(paths.project.upgradeAllProjectReportRevision, { projectId: projectId })
  }

  service.upgradeSelectReportRevision = function (projectReportIds) {
    return common.get(paths.project.upgradeSelectReportRevision, { projectReportIds: projectReportIds })
  }

  service.upgradeSelectReportRevisions = function (projectReport) {
    return common.post(paths.project.upgradeSelectReportRevisions, null, projectReport)
  }

  service.upgradeProjectReportRevision = function (projectReportId) {
    return common.postxf(paths.project.upgradeProjectReportRevision, { projectReportId: projectReportId })
  }

  service.switchProjectReportRevision = function (projectReportId, revisionId) {
    return common.postxf(paths.project.switchProjectReportRevision, {
      projectReportId: projectReportId,
      revisionId: revisionId
    })
  }

  service.getProjectReportUrl = function (projectId, revisionId, paramsMap) {
    return common.post(paths.project.getProjectReportUrl, {
      projectId: projectId,
      revisionId: revisionId
    }, paramsMap)
  }

  // 获取发送环节信息
  service.getSubmitActivityInfo = (projectId, taskId, activities) => {
    return common.get(paths.project.getSubmitActivityInfo, {
      projectId,
      taskId,
      activities
    })
  }
  // 获取当前业务环节信息
  service.getBusinessActivityByTask = (projectId, taskId) => {
    return common.get(paths.project.getBusinessActivityByTask, {
      projectId,
      taskId
    })
  }
  // 获取材料日志
  service.getMaterialLog = (refId) => {
    return common.get(paths.project.getMaterialLog, { refId })
  }
  // 提交任务
  service.submitTask = (params, query) => {
    console.log(paths.project.submitTask)
    return common.post(paths.project.submitTask, params, query)
  }
  // 提交时发送短信
  service.sendMsg = (params, query) => {
    return common.post(paths.project.sendMsg, params, query)
  }
  // 指标提取
  service.getZB = (params) => {
    return common.get(paths.project.getZB, params)
  }
  // 测绘数据提取
  service.getMappingDataExc = (params) => {
    return common.post(paths.project.getMappingDataExc, params)
  }
  // 获取项目信息
  service.getProjectInfo = (projectId, taskId) => {
    const tId = taskId && parseInt(taskId) > 0 ? parseInt(taskId) : null
    const configName = tId ? 'getProjectProcessingInfoByProjectId' : 'getProjectProcessInfoByProjectId'
    const sqlParam = {
      sqlConfigName: configName,
      pageIndex: 1,
      pageSize: 1,
      params: {
        projectId,
        taskId: tId
      }
    }
    return common.post(paths.sql.pageQuery, null, sqlParam)
  }
  // 地块上云审核获取项目信息
  service.getProjectDKInfo = (projectId) => {
    const sqlParam = {
      sqlConfigName: 'getProjectDkInfoByProjectId',
      pageIndex: 1,
      pageSize: 1,
      params: { projectId: projectId }
    }
    return common.post(paths.sql.pageQuery, null, sqlParam)
  }
  // 领取任务
  service.chageReadState = (params) => {
    return common.get(paths.project.chageReadState, params)
  }
  // 改派任务
  service.reassignTask = (params, query) => {
    return common.post(paths.project.reassignTask, params, query)
  }
  // 流程改派
  service.reassignProcess = (params, query) => {
    return common.post(paths.project.reassignProcess, params, query)
  }
  // 流程改派(补正结束返回首个环节)
  service.returnProcess = (params, query) => {
    return common.post(paths.project.returnProcess, params, query)
  }
  // 流程改派
  service.reassignActivity = (params, query) => {
    return common.post(paths.project.reassignActivity, params, query)
  }
  // 获取改派环节信息
  service.getReassignList = (params) => {
    return common.get(paths.project.getReassignList, params)
  }

  service.blankoutProject = function (params, projectReason) {
    return common.post(paths.project.blankoutProject, params, projectReason)
  }

  // 流程终止
  service.processEnd = function (params, projectReason) {
    return common.post(paths.project.processEnd, params, projectReason)
  }

  service.recoveryProject = function (params, projectReason) {
    return common.post(paths.project.recoveryProject, params, projectReason)
  }
  // 删除项目
  service.deleteProject = function (params, projectReason) {
    return common.post(paths.project.deleteProject, params, projectReason)
  }
  // 退件
  service.returnProject = function (params, projectReason) {
    return common.post(paths.project.returnProjectNew, params, projectReason)
  }

  // 获取可回退环节列表
  service.getReturnList = (params) => {
    return common.get(paths.project.getReturnList, params)
  }
  // 回退项目
  service.returnTask = (params, data) => {
    return common.post(paths.project.returnTask, params, data)
  }
  // 挂起项目
  service.suspendProject = function (params, projectReason) {
    return common.post(paths.project.suspendProject, params, projectReason)
  }
  // 挂起项目2
  service.suspendProject2 = function (params, projectReason) {
    return common.post(paths.project.suspendProject2, params, projectReason)
  }
  // 取消挂起项目2
  service.unSuspendProject2 = function (params, projectReason) {
    return common.post(paths.project.unSuspendProject2, params, projectReason)
  }
  // 激活项目
  service.activateProject = function (params, projectReason) {
    return common.post(paths.project.activateProject, params, projectReason)
  }
  // 获取意见列表
  service.getProjectOpinion = (params) => {
    return common.get(paths.opinion.getOpinion, params)
  }
  service.getProjectOpinionByGroup = (params) => {
    return common.post(paths.opinion.getOpinionByGroup, params)
  }
  // 获取:意见列表
  service.listOpinionGroup = (params) => {
    return common.post(paths.opinion.listOpinionGroup, params)
  }
  // 获取:不同层级意见模型
  service.getTierOpinionModel = (projectId, belongType) => {
    return common.get(paths.opinion.getTierOpinionModel, { projectId, belongType })
  }
  // 获取意见列表
  service.getTaskOpinion = (params) => {
    return common.get(paths.opinion.getTaskOpinion, params)
  }
  // 保存意见
  service.saveOpinion = (data) => {
    return common.post(paths.opinion.saveOpinion, null, data)
  }
  // 保存项目意见
  service.saveProjectOpinion = (params, data) => {
    return common.post(paths.opinion.saveProjectOpinion.replace('{projectId}', params.projectId), params, data)
  }
  // 保存:意见对象
  service.saveProjectOpinionByDTO = (params, data) => {
    return common.post(paths.opinion.saveProjectOpinionByDTO, params, data)
  }
  // 删除意见
  service.deleteOpinion = (data) => {
    return common.post(paths.opinion.deleteOpinion.replace('{id}', data.id), null)
  }
  // 取回任务
  service.retrieveTask = (params) => {
    return common.post(paths.project.retrieveTask, params, null)
  }

  // 获取转办人员
  service.listHandOverUser = (params) => {
    return common.get(paths.project.listHandOverUser, params)
  }

  // 执行转办
  service.doHandOverTask = (params) => {
    return common.post(paths.project.doHandOverTask, params)
  }

  service.readAllMessageItems = function () {
    return common.post(paths.project.readAllMessageItems)
  }

  service.listFormPrivilege = function (businessFormId, revisionId) {
    return common.get(paths.project.listFormPrivilege, {
      businessFormId: businessFormId,
      revisionId: revisionId
    })
  }

  service.listFormPrivilegeByTaskId = function (taskId, projectId, businessFormId, revisionId) {
    return common.get(paths.project.listFormPrivilegeByTaskId, {
      taskId,
      projectId,
      businessFormId,
      revisionId
    })
  }

  service.listProjectOperateByProjectId = function (projectId) {
    return common.get(paths.project.listProjectOperateByProjectId, { projectId: projectId })
  }

  service.saveObjectRelation = (params, data) => {
    return common.post(paths.objRelation.saveObjectRelation, params, data)
  }

  service.saveObjectRelationList = (params, data) => {
    return common.post(paths.objRelation.saveObjectRelationList, params, data)
  }

  service.deleteObjectRelation = (params, data) => {
    return common.post(paths.objRelation.deleteObjectRelation, params, data)
  }

  service.deleteObjectRelationList = (params, data) => {
    return common.post(paths.objRelation.deleteObjectRelationList, params, data)
  }

  /**
   * 获取重办项目启动参数
   * @param projectId
   * @returns {Promise | Promise<unknown>}
   */
  service.getRedoProjectParams = (projectId) => {
    const sqlParam = {
      sqlConfigName: 'getRedoProjectParams',
      pageIndex: 1,
      pageSize: 1,
      params: { projectId }
    }
    return common.post(paths.sql.pageQuery, null, sqlParam)
  }

  /**
   * 重办流程
   * @param projectId
   * @param activityName
   * @param userLoginName
   * @returns {Promise | Promise<unknown>}
   */
  service.redoProcess = (projectId, taskId, activityName, userLoginName) => {
    return common.postxf(paths.project.redoProcess, {
      projectId,
      taskId,
      activityName: activityName || null,
      userLoginName: userLoginName || null
    })
  }

  /**
   * OCR填充机构化数据
   * @param params
   * @param data
   * @param callback
   */
  service.uploadFileParsingInfo = (params, data, callback) => {
    return request({
      url: paths.project.uploadFileParsingInfo,
      method: 'post',
      params: params,
      data: data,
      onUploadProgress (progressEvent) {
        if (progressEvent.lengthComputable) {
          const val = Number((progressEvent.loaded / progressEvent.total * 100).toFixed(2))
          callback(parseInt(val))
        }
      }
    })
  }

  /**
   * OCR获取非结构化数据 excel/word
   * @param params
   * @param data
   * @param callback
   */
  service.exportParsingFile = (params, data, callback) => {
    return request({
      url: paths.project.exportParsingFile,
      method: 'post',
      params: params,
      data: data,
      onUploadProgress (progressEvent) {
        if (progressEvent.lengthComputable) {
          const val = Number((progressEvent.loaded / progressEvent.total * 100).toFixed(2))
          callback(parseInt(val))
        }
      }
    })
  }

  // 关联大项目
  service.relatedBase = (params) => {
    return common.get(paths.project.relatedBase, params)
  }

  // 取消关联大项目
  service.abolitionRelatedBase = (params) => {
    return common.get(paths.project.abolitionRelatedBase, params)
  }

  // 生成文号
  service.createNumber = (data) => {
    return common.post(paths.project.createNumber, null, data)
  }

  // 生成并保存文号
  service.createAndSaveNumber = (data) => {
    return common.post(paths.project.createAndSaveNumber, null, data)
  }

  // 生成文号（无projectId）
  service.newCreateNumber = (data) => {
    return common.post(paths.project.newCreateNumber, null, data)
  }

  // 删除文号
  service.deleteNumber = (data) => {
    return common.post(paths.project.deleteNumber, null, data)
  }

  // 获取编号规则
  service.getNumberRuleByName = (params) => {
    return common.get(paths.project.getNumberRuleByName, params)
  }

  // 获取项目树
  service.getProjectTree = (params) => {
    return common.get(paths.project.getProjectTree.replace('{projectId}', params), {
      projectTreeType: 'timeFirst',
      loadObject: true
    })
  }

  // 获取会审人员列表
  service.getActivityInfoByOrgs = (params) => {
    return common.get(paths.project.getActivityInfoByOrgs, params)
  }

  // 启动会审
  service.startMultiOpinion = (params, data) => {
    return common.post(paths.project.startMultiOpinion, params, data)
  }

  service.sendMultiOpinion = (params, data) => {
    return common.post(paths.project.sendMultiOpinion, params, data)
  }

  // 结束会审
  service.finishMultiOpinion = (params, data) => {
    return common.post(paths.project.finishMultiOpinion, params, data)
  }

  // 制证
  service.makeSignCertificate = (params) => {
    return common.get(paths.project.makeSignCertificate, params)
  }

  // 受理
  service.acceptProject = (params, data) => {
    return common.post(paths.project.acceptProject, params, data)
  }

  // 续办受理
  service.continueProject = (params, data) => {
    return common.post(paths.project.continueProject, params, data)
  }

  // 不予受理
  service.refuseAcceptProject = (params, data) => {
    return common.post(paths.project.refuseAcceptProject, params, data)
  }

  // 向工改推送数据
  service.dxSendData = (params) => {
    return common.get(paths.project.dxSendData, params)
  }

  // 获取模块绑定的业务
  service.listBusinessDTOsByCustomModelIds = function (customModelIds) {
    return common.get(paths.project.listBusinessDTOsByCustomModelIds, { customModelIds: customModelIds })
  }

  // 用途管制复杂的左侧案件信息树:新
  service.getMatterResourceList = params => {
    return common.get(paths.project.getMatterResourceList, params)
  }

  // 用途管制复杂的左侧案件信息树
  service.getYtgzProjectResourceList = (projectId, listType = 'business') => {
    return common.get(paths.project.getYtgzProjectResourceList, { projectId, listType, loadForm: true })
  }

  // 用途管制复杂的左侧案件信息树初始化
  service.initResource = (projectId) => {
    return common.get(paths.project.initResource, { projectId })
  }

  // 项目收藏
  service.projectCollect = (params) => {
    return common.post(paths.project.projectCollect, params)
  }

  // 打印
  service.printReport = (projectId, ids) => {
    return common.get(paths.project.reportPrint, { projectId: projectId, reportRevisionIds: ids })
  }

  // 获取会审启动环节人员树
  service.getStartUserList = (projectId) => {
    return common.get(paths.project.getStartUserList, { projectId })
  }
  service.getJointActivityList = (projectId, taskId) => {
    return common.get(paths.project.getJointActivityList, { projectId: projectId, taskId: taskId })
  }
  // 创建会审
  service.startJoint = (params, data) => {
    return common.post(paths.project.startJoint, params, data)
  }
  service.startJoinTask = (params, data) => {
    return common.post(paths.project.startJoinTask, params, data)
  }

  // 获取会审记录列表
  service.searchProjectJointLogList = (projectId, query) => {
    return common.post(paths.project.searchProjectJointLogList, { projectId }, query)
  }

  // 获取会审意见
  service.opinionShowGroup = (params) => {
    return common.get(paths.project.opinionShowGroup, params)
  }

  // 完成会审
  service.finishProjectJoint = (projectId) => {
    return common.get(paths.project.finishProjectJoint, { projectId })
  }

  // 重启会审
  service.reStartSingleJoint = (projectId, jointLogId, taskId) => {
    return common.get(paths.project.reStartSingleJoint, { projectId, jointLogId, taskId })
  }

  // 终止会审
  service.terminateSingleJoint = (projectId, jointLogId) => {
    return common.get(paths.project.terminateSingleJoint, { projectId, jointLogId })
  }

  /**
   * 获取被修改的表和字段
   * @param projectId
   * @returns {Promise | Promise<unknown>}
   */
  service.getProjectDataVersion = (projectId) => {
    return common.get(paths.project.getProjectDataVersion, { projectId })
  }

  service.updateProjectStatus = function (projectId, status) {
    return common.post(paths.project.updateProjectStatus, { projectId, status })
  }

  /**
   * 不受理案件
   * @param params
   * @returns {*}
   */
  service.disAcceptProject = (params) => {
    return common.post(paths.project.disAcceptProject, params)
  }

  /**
   * 获取项目全阶段
   * @param projectId
   * @returns {Promise<unknown>}
   */
  service.getProjectStageList = (projectId) => {
    const url = `${paths.project.getProjectTreeList}`
    return common.get(url, { projectId })
  }

  service.getCloudSignSeals = function () {
    return common.get(paths.project.getCloudSignSeals)
  }

  service.getSignFileUrl = function (params) {
    return common.get(paths.project.getSignFileUrl, params)
  }

  service.signXY = function (params) {
    return common.post(paths.project.signXY, params)
  }

  service.rotateFile = function (params) {
    return common.get(paths.project.rotateFile, params)
  }

  service.createGisProject = function (params, data) {
    return common.post(paths.project.createGisProject, params, data)
  }
  // 业务的图形属性更新
  service.updateBusinessProject = function (data) {
    return common.post(window.config.VUE_APP_GIS_API + 'business/updateBusinessProject', null, data)
  }
  // 保存督办意见
  service.saveSuperviseLog = function (data) {
    return common.post(paths.project.saveSuperviseLog, null, data)
  }
  // 获取督办意见列表
  service.getSuperviseLogList = function (params) {
    return common.post(paths.project.getSuperviseLogList, params, null)
  }
  // 测试受理
  service.testAccept = function (params) {
    return common.get(paths.project.testAccept, params)
  }

  // 拟文
  service.drafting = function (params) {
    return common.post(paths.project.drafting, params, null)
  }

  // 删除会议
  service.deleteMeeting = (params) => {
    return common.get(paths.common.deleteMeeting, params)
  }
  // 保存整个会议
  service.saveMeetingFull = (params, data) => {
    return common.post(paths.common.saveMeetingFull, params, data)
  }
  service.createGisProjectByWKT = function (params) {
    return common.post(paths.common.createGisProjectByWKT, params)
  }
  // 获取会议信息
  service.getMeetingFull = (params) => {
    return common.get(paths.common.getMeetingFull, params)
  }
  // 删除会议关联项目信息
  service.deleteMeetingProjectByIds = (params) => {
    return common.get(paths.common.deleteMeetingProjectByIds, params)
  }
  // 保存会议项目关联关系
  service.saveProjectToMeeting = (params) => {
    return common.get(paths.common.saveProjectToMeeting, params)
  }
  // 保存会议项目关联关系
  service.saveProjectLog = (params) => {
    return common.get(paths.project.saveProjectLog, params)
  }
  // 结束会议
  service.endMeeting = (params) => {
    return common.get(paths.common.endMeeting, params)
  }
  // 会议删除一个材料
  service.deleteMaterial = (params) => {
    return common.get(paths.common.deleteMaterial, params)
  }
  // 上传一个材料
  service.uploadMaterial = (params, data) => {
    return common.post(paths.common.uploadMaterial, params, data)
  }
  // 保存会议状态
  service.saveMeetingState = (params) => {
    return common.get(paths.common.saveMeetingState, params)
  }
  // 保存网上报件日志
  service.saveEaProjectLog = function (param, data) {
    return common.post(paths.project.saveEaProjectLog, param, data)
  }

  // 待受理箱-保存日志
  service.addEAProjectLog = (params) => {
    return common.post(paths.project.addEAProjectLog, params)
  }
  // 待受理箱-受理
  service.acceptProject2 = (params, data) => {
    return common.post(paths.project.acceptProject2, params, data)
  }
  // 待受理箱-不予受理
  service.refuseAcceptProject2 = (params) => {
    return common.post(paths.project.refuseAcceptProject2, params)
  }

  // 待受理箱-办理进度
  service.getEaProjectLog = function (param) {
    return common.get(paths.project.getEaProjectLog, param)
  }
  // 政务2.0受理
  service.acceptProjectByGovTow = function (param, data) {
    return common.post(paths.project.acceptProjectByGovTow, param, data)
  }

  // 删除材料时删除勘测定界清单
  service.deleteKcdjInfoByMaterialId = function (param) {
    return common.get(paths.project.deleteKcdjInfoByMaterialId, param)
  }
  // 上传材料时生成勘测定界清单
  service.createKcdjInfoByMaterialId = function (param) {
    return common.get(paths.project.createKcdjInfoByMaterialId, param)
  }

  service.getProjectById = (projectId) => {
    return common.get(paths.project.getProjectById, { projectId })
  }
  service.getBusinessExtend = (businessid, extendname) => {
    return common.post(paths.project.getBusinessExtend, { id: businessid, name: extendname })
  }

  service.importOffer = (file, projectId) => {
    const formData = new FormData()
    formData.set('file', file)
    return common.post(paths.common.importOffer, { projectId: projectId }, formData)
  }

  service.updateProjectDueTime = (projectId, days) => {
    return common.post(paths.common.updateProjectDueTime, { projectId, days })
  }

  service.importExcelByCreateProject = (params, query) => {
    return common.post(paths.project.importExcelByCreateProject, params, query)
  }
  service.getProjectImportStatus = (ajbh, layerId) => {
    return common.get(paths.project.getProjectImportStatus, { ajbh, layerId })
  }

  // 作废/退件 删除入库图形
  service.deleteGraph = (params, query) => {
    return common.post(paths.project.deleteGraph, params, query)
  }

  service.treeBusinessFlowByBusinessId = function(businessId) {
    return common.get(paths.flow.treeBusinessFlowByBusinessId, { businessId })
  }

  // 获取流转日志
  service.getProjectOperateTree = projectId => {
    return common.get(paths.project.getProjectOperateDTOTree, { projectId })
  }

  service.getBusinessById = businessId => {
    return common.get(paths.business.getBusinessById, { businessId })
  }
  // html流程图
  service.getHtmlDiagram = (processInstId) => {
    return common.get(paths.project.getHtmlDiagram, {
      processInstId
    })
  }
  service.getEnvVariable = (name, type) => {
    return common.get(paths.project.getEnvVariable, { name, type })
  }
})(projectService)

export default projectService
